package com.example.demo.service.impl;

import com.example.demo.entity.Mdtype;
import com.example.demo.entity.Means;
import com.example.demo.mapper.DataMapper;
import com.example.demo.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class DataServiceImpl implements DataService {

    @Autowired
    private DataMapper dataMapper;
    @Override
    public List<Means> findAllMeans(String title) {
        return dataMapper.findAllMeans(title);
    }

    @Override
    public List<Mdtype> findAllMdtype() {
        return dataMapper.findAllMdtype();
    }

    @Override
    public void addMdtype(String text) {
        dataMapper.addMdtype(text);
    }

    @Override
    public void modifyMdtype(String id, String text) {
        dataMapper.modifyMdtype(id,text);
    }

    @Override
    public void delMdtypeById(String id) {
        dataMapper.delMdtypeById(id);
    }

    @Override
    public void updateMeans(Map<String, String> map) {
        dataMapper.updateMeans(map);
    }

    @Override
    public void addMeans(Map<String, String> map) {
        dataMapper.addMeans(map);
    }

    @Override
    public Means getByDid(String did) {
        return dataMapper.getByDid(did);
    }

    @Override
    public void modifyMeans(Map<String, String> map) {
        dataMapper.modifyMeans(map);
    }

    @Override
    public void delByDid(String did) {
        dataMapper.delByDid(did);
    }
}
